<?xml version="1.0" encoding="UTF-8" ?>
<%@ page import="org.swimv2.model.Persona" %>
<%@ page import="org.swimv2.model.Lavoro" %>
<%@ page import="java.util.List" %>
<%@page import="landmark.LandmarkLavoro"%>
<%@page import="landmark.Link"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pagina lavoro</title>
<link rel="stylesheet" type="text/css" href="scheletro.css">
</head>
<body>
<div id="container">
<table class="topHome">
	<tr>
		    <td id="logoHome">
	<a href="home.jsp">Swim v2</a>
	<br><br><b> A help with a click!</b>

		    </td>
			<td class="personal">
		
				<b>Ciao :<a href="PaginaProfiloServlet">${sessionScope.utente.nome}</a> </b>&nbsp;&nbsp;&nbsp;<a href="Notifiche"><b>Interazioni</b></a>&nbsp;<a href="messaggi.jsp"><b>Messaggi</b></a>&nbsp;&nbsp;&nbsp;<div id="button"><a href="Logout" id="logout">Logout</a></div>

			</td>		
	</tr>
</table>

<div id="nav"> 
	<ul>
		<%
			Link a[]  = LandmarkLavoro.getLandmark();
			for(int i=0; i<a.length; i++)
			{
		%>
			<%
				if(a[i].getValue().equalsIgnoreCase("Lavori"))
				{
			%>
				<li><a href="<%=a[i].getHref() %>"><u><%=a[i].getValue() %></u></a></li>
			<%	}
			%>
			
			<%	if(!a[i].getValue().equalsIgnoreCase("Lavori"))
				{
			%>
				<li><a href="<%=a[i].getHref() %>"><%=a[i].getValue() %></a></li>
			<%} 
			%>
		<%} 
		%>
	</ul>
</div>


<% Lavoro l=(Lavoro)request.getAttribute("lavoroTemp");
	request.getSession().setAttribute("idLavoroTemp",l.getId());		%>


<div id="form">
<div id="titlePage"><h1><%= l.getNome() %></h1></div><br><br>

<fieldset>


<br><br>

<b>Sede: <%= l.getSede() %></b> 
<br><br>
<b>Stato:<%= l.getStato() %></b>

<br><br>

<b>Membri:</b>

<ul type="square">
 <li><b>Commiss:</b><form action="PaginaProfiloServlet" method="get"> <input type="submit"  name="username" id="button" value="<%=l.getPersona().getUserID() %>"></input></form></li>
 <li><b>Partecipanti:</b>
  <ul type="circle">
   <%
   		@SuppressWarnings("unchecked")
		List<Persona> membri= (List<Persona>) request.getAttribute("listMembri");
						
   	for(Persona u: membri) {
							
						%>
   <li><form action="VisualizzaProfiloUtente" method="get"> <input type="submit"  name="username" id="button" value="<%=u.getUserID() %>"></input></form></li>  
   <% } %>

  </ul>
 
  
</ul><br><br>
<%
Persona per = (Persona)request.getSession().getAttribute("utente");
if(l.getPersona().getUserID().equals(per.getUserID())){
%>
<form action="RilasciaFeedback" method="get"><br>
   <input type="submit" id="button" name="button" value="Rilascia feedback!"></form> 
   
   <%}%>
   
</fieldset>

 
</div>
</div>
</body>
</html>